package com.zhj.user.service;

import com.zhj.user.entity.dto.UserDTO;
import com.zhj.user.entity.dto.UserRegisterDTO;
import com.zhj.user.entity.pojo.User;
import com.zhj.user.entity.vo.WxLoginResponseVO;

public interface UserService{

    User selectByPrimaryKey(String id);

    /**
     * 判断用户是否存在
     * @param username
     * @return
     */
    boolean usernameIsExist(String username);

    User createUser(UserRegisterDTO userDTO);

    /**
     * 用户登录
     * @param userDTO
     * @return
     */
    User login(UserDTO userDTO);

    /**
     * 微信登录
     * @param jsCode
     * @return
     */
    WxLoginResponseVO loginForWx(String jsCode);
}
